<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/lib/common/basedir.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
<%@include file="/lib/common/headerResource.html"%>

<!--footer.css-->
<link href="lib/css/footer.css" rel="stylesheet">

<title>DessertHouse Login</title>

<style>
h1 {
	font-size: 3.5em;
	margin-top: 6%;
	margin-bottom: 4%
}

.login-form {
	padding-left: 3%;
	padding-right: 3%
}

.group-gap {
	margin-bottom: 8%;
}

.sign-up {
	float: right;
}
</style>
</head>
<body>
	<div class="container">
		<div class="row-fluid">
			<div class="col-md-12">
				<h1 class="text-center text-primary">DessertHouse</h1>
			</div>
		</div>
		<div class="row-fluid">
			<div class="col-xs-2 col-md-4"></div>
			<div class="col-xs-8 col-md-4  login-form">
				<form method="post" action="<%=basedir%>/Auth">
					<div class="form-group group-gap">
						<input type="text" name="userName" class="form-control input-lg"
							id="exampleInputEmail1" placeholder="NickName">
					</div>
					<div class="form-group group-gap ">
						<input type="password" name="password"
							class="form-control input-lg" id="exampleInputPassword1"
							placeholder="Password">
					</div>
					<div class="checkbox extraMsg">
						<label> <input type="checkbox"> Remember me
						</label> <label class="sign-up"><a href="<%=basedir%>/register">sign
								up</a></label>
					</div>

					<button type="submit"
						class="btn btn-block btn-primary btn-lg btn-login">Login</button>
						
					<%if(request.getAttribute("authFailed")!=null&&request.getAttribute("authFailed").equals("true")){ %>
					<div class="alert alert-danger alert-dismissible"  role="alert"  style="margin-top:2em;">
						<button type="button" class="close" data-dismiss="alert"
							aria-label="Close">
							<span aria-hidden="true">&times;</span>
						</button>
						wrong username or password
					</div>
					<%}else{} %>
				</form>
			</div>
			<div class="col-xs-2 col-md-4"></div>
		</div>
	</div>

	<%@include file="/lib/common/footer.html"%>

	<!-- jquery and bootstrap js -->
	<%@include file="/lib/common/footerResource.html"%>
	
	

</body>
</html>